package zee.com.customviewexample.activity

import MyFloatWindow
import android.view.Gravity
import android.view.MotionEvent
import android.view.View
import android.widget.FrameLayout
import android.widget.ImageView
import android.widget.RelativeLayout
import com.lzf.easyfloat.EasyFloat
import com.lzf.easyfloat.enums.ShowPattern
import com.lzf.easyfloat.interfaces.OnInvokeView
import com.zee.dialog.BindViewAdapter
import kotlinx.android.synthetic.main.activity_my_float_window.*
import zee.com.customviewexample.R
import kotlin.math.max

/**
 * 悬浮窗
 */
class MyFloatWindowActivity : BaseActivity() {
    override fun getLayoutID(): Int {
        return R.layout.activity_my_float_window
    }

    override fun initViews() {
        float_right.setOnClickListener {

            MyFloatWindow.init(object : BindViewAdapter(R.layout.item_my_float_window) {
                override fun initViews(paView: View?) {
                    setText(R.id.tv_btn, "测试悬浮按钮")

                }

            }, "time").showOnForeground(Gravity.BOTTOM)
        }


    }
}
